from django.conf import settings
from django.conf.urls.defaults import patterns, include, url
from django.conf.urls.static import static

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'dessert_house.views.home', name='home'),
    # url(r'^dessert_house/', include('dessert_house.foo.urls')),

    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^shop/', include('dessert_house.shop.urls')),
    url(r'^backend/', include('dessert_house.backend.urls')),
    url(r'^', include('dessert_house.core.urls')),
)

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
